The present section is intended to introduce the reader to various aspects of art, which may be related to various aspects of the present disclosure that are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present invention. Accordingly, it should be understood that these statements are to be read in this light, and not as admissions of prior art.
Encoding (obtaining) color differences (color difference components) for color picture data belonging to an input three dimensional color space (C1, C2, C3) stands for representing the triplets of the color picture data in an output three dimensional color space (D1, D2, D3) where D1 is a first component defined from the component D1, D2 is a first color difference component defined from the component C2 and the component C1, and D3 is a second color difference component defined from the component C3 and the component C1.
The CIEXYZ or RGB color spaces are examples of input color space and the CIELab or YDzDx (“WD SMPTE Standard: YDzDx Color-Difference Encoding for XYZ integer signals”, version 1.06 of 2014 Mar. 3) color spaces are examples of the output color space but the disclosure is not limited to any input and/or output specific color space.
According to prior art, encoding color differences comprises color-transforming the triplets of color picture data to triplets of the three dimensional space and quantizing said color-transformed triplets.
More precisely, as illustrated in FIG. 1, a module C1C2C3-to-D1D2D3 is configured to obtain triplets (ED1, ED2, ED3) of floating point values by color-transforming the triplets (C1, C2, C3) of the input color space according to equations (1):ED1=F1(C1)ED2=F2(C2,C1)ED3=F3(C3,C1)  (1)
where F1( ), F2( ) and F3( ) represent color-transform functions implemented by the module C1C2C3-to-D1D2D3.
Next, modules Q1, Q2 and Q3 are configured to obtain the triplets (DD1, DD2, DD3) of integer values of the output color space by quantizing the triplets (ED1, ED2, ED3) according to equations (2):DD1=Q1(ED1)DD2=Q2(ED2)DD3=Q3(ED3)  (2)
where Q1( ), Q2( ) and Q3( ) represents the quantizing functions implemented by the modules Q1, Q2 and Q3 respectively.
Note in the following, the notation EA stands for a floating point version of a value A and DA stands for an integer (digital) version of a value A.
According to an example, when the input color space is the CIEXYZ color space (C1=Y, C2=X and C3=Z) and the output color space is the CIELab1976 color space (D1=L, D2=a*, D3=b*), the triplets (X,Y,Z) are color-transformed according to equations (3):ED1=L=F1(Y)=116Y−16ED2=a*=F2(X,Y)=500(X−Y)ED3=b*=F3(Z,Y)=200(Y−Z)  (3)
The triplets (ED1,ED2,ED3) given by equation (3) are then quantized according to equations (4):
                                          D                          D              1                                =                                    Q              ⁢                                                          ⁢              1              ⁢                              (                                  E                                      D                    1                                                  )                                      =                          INT              ⁡                              [                                                      (                                                                  876                        ·                                                  (                                                                                                                    E                                                                  D                                  1                                                                                            -                                                              E                                                                  D                                  ⁢                                                                                                                                          ⁢                                  1                                  ⁢                                                                                                                                          ⁢                                  min                                                                                                                                                                                    E                                                                  D                                  ⁢                                                                                                                                          ⁢                                  1                                  ⁢                                  peak                                                                                            -                                                              E                                                                  D                                  ⁢                                                                                                                                          ⁢                                  1                                  ⁢                                  min                                                                                                                                              )                                                                    +                      64                                        )                                    ·                                      2                                          n                      -                      10                                                                      ]                                                    ⁢                                  ⁢                              D                          D              2                                =                                    Q              ⁢                                                          ⁢              2              ⁢                              (                                  E                                      D                    2                                                  )                                      =                          INT              ⁡                              [                                                      (                                                                  896                        ·                                                  (                                                                                    E                                                              D                                2                                                                                                                                                    E                                                                  D                                  ⁢                                                                                                                                          ⁢                                  2                                  ⁢                                  peak                                                                                            -                                                              E                                                                  D                                  ⁢                                                                                                                                          ⁢                                  2                                  ⁢                                  min                                                                                                                                              )                                                                    +                      512                                        )                                    ·                                      2                                          n                      -                      10                                                                      ]                                                    ⁢                                  ⁢                              D                          D              3                                =                                    Q              ⁢                                                          ⁢              3              ⁢                              (                                  E                                      D                    3                                                  )                                      =                          INT              ⁡                              [                                                      (                                                                  896                        ·                                                  (                                                                                    E                                                              D                                3                                                                                                                                                    E                                                                  D                                  ⁢                                                                                                                                          ⁢                                  3                                  ⁢                                  peak                                                                                            -                                                              E                                                                  D                                  ⁢                                                                                                                                          ⁢                                  3                                  ⁢                                  min                                                                                                                                              )                                                                    +                      512                                        )                                    ·                                      2                                          n                      -                      10                                                                      ]                                                                        (        4        )            
where EDipeak and EDimin (i=1, 2, 3) respectively stand for a predefined peak (bound) and a minimum for a color component EDi.
These upper and lower bounds can be determined according to the range of a component of the color picture values in order, for example, to be supported by a coding scheme.
According to another example, when the input color space is the CIEXYZ color space (C1=Y, C2=X and C3=Z) and the output color space is the YDzDx color space, the triplets (X, Y, Z) are color-transformed according to equations (5):
                                          E                          D              1                                =                      F            ⁢                                                  ⁢            1            ⁢                          (              Y              )                                      ⁢                                  ⁢                              E                          D              2                                =                                    F              ⁢                                                          ⁢              2              ⁢                              (                                  X                  ,                  Y                                )                                      ==                                          X                -                                                      c                    2                                    ⁢                  Y                                            2.0                                      ⁢                                  ⁢                              E                          D              3                                =                                    F              ⁢                                                          ⁢              3              ⁢                              (                                  Z                  ,                  Y                                )                                      =                                                                                c                    1                                    ⁢                  Z                                -                Y                            2.0                                      ⁢                                  ⁢                              c            1                    =                      2763            2800                          ⁢                                  ⁢                              c            2                    =                      2741            2763                                              (        5        )            
The triplets (ED1,ED2,ED3) given by equations (5) are then quantized according to equations (6):DD1=Q1(ED1)=INT[(876·ED1+64)·2n-10]DD2=122(ED2)=INT[(896·ED2+512)·2n-10]DD3=123(ED3)=INT[(896·ED3+512)·2n-10]  (6)
Decoding the triplets (DD1, DD2, DD3) of color differences which belong to the output color space (obtained as explained above in relation with FIG. 1) is the mathematical inverse of the encoding of said color differences as illustrated in FIG. 2.
Modules IQ1, IQ2 and IQ3 are configured to obtain inverse-quantized triplets (,,) by inverse-quantizing the triplets (DD1,DD2,DD3) and a module D1D2D3-to-C1C2C3 is configured to obtain triplets of decoded color picture data (,,) by inverse-transforming the inverse-quantized triplets (,,).
Equations (7) define the combination of the inverse-quantizing and inverse-transforming operations:=IF1(IQ1(DD1))=IF2(1Q2(DD2),IQ1(DD1))=IF3(IQ3(DD3),IQ1(DD1))  (7)
where IF1( ), respectively IF2( ) and IF3( ), represents the inverse of the color-transform function F1( ), respectively F2( ) and F30 implemented by the module C1C2C3-to-D1D2D3 and IQ1( ), respectively IQ2( ) and IQ3( ), represents the inverse of the quantizing functions Q10, respectively Q2( ) and Q3( ).
According to an example, when the input color space is the CIEXYZ color space (C1=Y, C2=X and C3=Z) and the output color space is the CIELab1976 color space (D1=L, D2=a*, D3=b*), the triplets (=2,=Ŷ, ={circumflex over (Z)}) of decoded color picture data are obtained according to equations (8):
                                                                        E                ^                                            D                1                                      =                                          IQ                ⁢                                                                  ⁢                1                ⁢                                  (                                      D                                          D                      1                                                        )                                            =                                                                    1                    876                                    ⁢                                                            (                                                                                                    D                                                          D                              1                                                                                                            2                                                          n                              -                              10                                                                                                      -                        64                                            )                                        ·                                          (                                                                        E                                                      D                            ⁢                                                                                                                  ⁢                            1                            ⁢                            peak                                                                          -                                                  E                                                      D                            ⁢                                                                                                                  ⁢                            1                            ⁢                            min                                                                                              )                                                                      +                                  E                                      D                    ⁢                                                                                  ⁢                    1                    ⁢                    min                                                                                ⁢                                          ⁢                                                    E                ^                                            D                2                                      =                                          IQ                ⁢                                                                  ⁢                2                ⁢                                  (                                      D                                          D                      2                                                        )                                            =                                                                    1                    448                                    ⁢                                                            (                                                                                                    D                                                          D                              2                                                                                                            2                                                          n                              -                              10                                                                                                      -                        512                                            )                                        ·                                          (                                                                        E                                                      D                            ⁢                                                                                                                  ⁢                            2                            ⁢                            peak                                                                          -                                                  E                                                      D                            ⁢                                                                                                                  ⁢                            2                            ⁢                            min                                                                                              )                                                                      +                                  E                                      D                    ⁢                                                                                  ⁢                    2                    ⁢                    min                                                                                ⁢                                          ⁢                                                    E                ^                                            D                3                                      =                                          IQ                ⁢                                                                  ⁢                3                ⁢                                  (                                      D                                          D                      3                                                        )                                            =                                                                    1                    448                                    ⁢                                                            (                                                                                                    D                                                          D                              3                                                                                                            2                                                          n                              -                              10                                                                                                      -                        512                                            )                                        ·                                          (                                                                        E                                                      D                            ⁢                                                                                                                  ⁢                            3                            ⁢                            peak                                                                          -                                                  E                                                      D                            ⁢                                                                                                                  ⁢                            3                            ⁢                            min                                                                                              )                                                                      +                                  E                                      D                    ⁢                                                                                  ⁢                    3                    ⁢                    min                                                                                ⁢                                          ⁢                                          ⁢                                  =                                          IF                ⁢                                                                  ⁢                1                ⁢                                  (                                      IQ                    ⁢                                                                                  ⁢                    1                    ⁢                                          (                                              D                                                  D                          1                                                                    )                                                        )                                            =                                                                    E                    ^                                                                              D                      1                                        +                    16                                                  116                                                    ⁢                                  ⁢                                  ⁢                            =                                    IF              ⁢                                                          ⁢              2              ⁢                              (                                                      IQ                    ⁢                                                                                  ⁢                    2                    ⁢                                          (                                              D                                                  D                          2                                                                    )                                                        ,                                      IQ                    ⁢                                                                                  ⁢                    1                    ⁢                                          (                                              D                                                  D                          1                                                                    )                                                                      )                                      =                                                                                E                    ^                                                        D                    2                                                  500                            +                              (                                                                            E                      ^                                                                                      D                        1                                            +                      16                                                        116                                )                                                    ⁢                                  ⁢                                  ⁢                            =                                    IF              ⁢                                                          ⁢              3              ⁢                              (                                                      IQ                    ⁢                                                                                  ⁢                    3                    ⁢                                          (                                              D                                                  D                          3                                                                    )                                                        ,                                      IQ                    ⁢                                                                                  ⁢                    1                    ⁢                                          (                                              D                                                  D                          1                                                                    )                                                                      )                                      =                                          (                                                                            E                      ^                                                                                      D                        1                                            +                      16                                                        116                                )                            -                                                                    E                    ^                                                        D                    3                                                  200                                                                        (        8        )            
According to another example, when the input color space is the CIEXYZ color space (C1=Y, C2=X and C3=Z) and the output color space is the YDzDx color space, the triplets (={circumflex over (X)},=Ŷ, ={circumflex over (Z)}) of decoded color picture data are obtained according to equations (9):
                                          X            ^                    =                                                    2                876                            ⁢                              (                                                                            D                                              D                        2                                                                                    2                                              n                        -                        10                                                                              -                  512                                )                                      +                                                            d                  1                                876                            ⁢                              (                                                                            D                                              D                        1                                                                                    2                                              n                        -                        10                                                                              -                  64                                )                                                    ⁢                                  ⁢                              Y            ^                    =                                    1              876                        ⁢                          (                                                                    D                                          D                      1                                                                            2                                          n                      -                      10                                                                      -                64                            )                                      ⁢                                  ⁢                              Z            ^                    =                                    d              2                        ⁡                          (                                                                    2                    876                                    ⁢                                      (                                                                                            D                                                      D                            3                                                                                                    2                                                      n                            -                            10                                                                                              -                      512                                        )                                                  +                                                      1                    876                                    ⁢                                      (                                                                                            D                                                      D                            1                                                                                                    2                                                      n                            -                            10                                                                                              -                      64                                        )                                                              )                                                          (        9        )            where d1=2741/2763 and d2=2800/2763.
According to the prior art, encoding color differences involves calculating color differences (equations (1), (3) or (5) for example) between the component C2 (respectively C3) and the component C1 but decoding color differences involves calculating sums between the color difference components DD2 (respectively DD3) and DD1 as illustrated by equations (8) or (9) for example. Those color difference components DD2 (respectively DD3) are quantized versions of the color-transformed version of the component C2 (respectively C3) and the sums are thus calculated between quantized components but the color differences are calculated between non-quantized versions of the components. Consequently, encoding/decoding color differences according to the prior art involves cumulating quantizing errors that lead to errors on the triplets ({circumflex over (X)}, Ŷ, {circumflex over (Z)}) of the decoded color picture data.